/*
 *  This file is part of Cube.
 *
 *  Cube is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Cube is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Cube.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

package cube;


import cube.charts.ChartManager;
import cube.charts.CubeChart;
import cube.data.AccelerationDataVector;
import cube.data.DataManager;
import cube.sensors.LIS3LV02DQ;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import org.jdesktop.application.Action;
import org.jdesktop.application.SingleFrameApplication;
import org.jdesktop.application.FrameView;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumn;
import org.apache.log4j.Logger;


/**
 * The application's main frame.
 */
public class CubeView extends FrameView {
    
    protected static final Logger log = Logger.getLogger(CubeView.class);
    private ChartManager chartManager;
    private DataManager dataManager;
    private SerialConnection serialConnection;
    private JDialog aboutBox;
    private LIS3LV02DQ accelerationSensor;
   
    public CubeView(SingleFrameApplication app) {
        super(app);
    
        initComponents();                   
        chartManager = ChartManager.getInstance();
        dataManager = DataManager.getInstance(this);
        serialConnection = new SerialConnection(dataManager, "COM1", 19200, 1, 8, "NONE");
        accelerationSensor = new LIS3LV02DQ(2, 2.5);
        displayCharts();          
        start();        
        updateAccelerationSensorOptions();
    }
    
    public void updateChart(ArrayList<AccelerationDataVector> accelerationDataVector){
        chartManager.updateValues(accelerationDataVector);
    }

    private void updateAccelerationSensorOptions(){
        Object[][] data = accelerationSensor.getInfos();
        String[] columnNames = {"Parameter", "Min.", "Typ.", "Max.", "Unit"};
        DefaultTableModel tabModel = new DefaultTableModel(data, columnNames);
        jTableOptionsAccelerometer.setModel(tabModel);
        TableColumn col = jTableOptionsAccelerometer.getColumnModel().getColumn(0);
        col.setMinWidth(400);

    }

    @Action
    public void showAboutBox() {
        if (aboutBox == null) {
            JFrame mainFrame = CubeApp.getApplication().getMainFrame();
            aboutBox = new CubeAboutBox(mainFrame);
            aboutBox.setLocationRelativeTo(mainFrame);
        }
        CubeApp.getApplication().show(aboutBox);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        mainPanel = new javax.swing.JPanel();
        jTabbedPane = new javax.swing.JTabbedPane();
        jPanelAngles = new javax.swing.JPanel();
        jPanelAnglesOptions = new javax.swing.JPanel();
        jLabelCube1 = new javax.swing.JLabel();
        jComboBoxCubeType = new javax.swing.JComboBox();
        jDesktopPaneAngles = new javax.swing.JDesktopPane();
        jPanelAccelerometer = new javax.swing.JPanel();
        jPanelAccelerationOptions = new javax.swing.JPanel();
        jLabelFilter = new javax.swing.JLabel();
        jLabelCharts = new javax.swing.JLabel();
        jLabelXAxis = new javax.swing.JLabel();
        jLabelFilters = new javax.swing.JLabel();
        jCheckBoxACDXN = new javax.swing.JCheckBox();
        jCheckBoxACDX1 = new javax.swing.JCheckBox();
        jCheckBoxACDX2 = new javax.swing.JCheckBox();
        jLabelYAxis = new javax.swing.JLabel();
        jCheckBoxACDYN = new javax.swing.JCheckBox();
        jCheckBoxACDY1 = new javax.swing.JCheckBox();
        jCheckBoxACDY2 = new javax.swing.JCheckBox();
        jLabelZAxis = new javax.swing.JLabel();
        jCheckBoxACDZN = new javax.swing.JCheckBox();
        jCheckBoxACDZ1 = new javax.swing.JCheckBox();
        jCheckBoxACDZ2 = new javax.swing.JCheckBox();
        jLabelCharts1 = new javax.swing.JLabel();
        jLabelFilters1 = new javax.swing.JLabel();
        jLabelXAxis1 = new javax.swing.JLabel();
        jCheckBoxACLYN = new javax.swing.JCheckBox();
        jCheckBoxACLY1 = new javax.swing.JCheckBox();
        jCheckBoxACLY2 = new javax.swing.JCheckBox();
        jCheckBoxACLXN = new javax.swing.JCheckBox();
        jCheckBoxACLX1 = new javax.swing.JCheckBox();
        jCheckBoxACLX2 = new javax.swing.JCheckBox();
        jCheckBoxACLZN = new javax.swing.JCheckBox();
        jCheckBoxACLZ1 = new javax.swing.JCheckBox();
        jCheckBoxLZ2 = new javax.swing.JCheckBox();
        jLabelYAxis1 = new javax.swing.JLabel();
        jLabelZAxis1 = new javax.swing.JLabel();
        jButtonChartsWithoutFilters = new javax.swing.JButton();
        jButtonAllDialCharts = new javax.swing.JButton();
        jButtonClear = new javax.swing.JButton();
        jComboBoxFilterType = new javax.swing.JComboBox();
        jComboBoxFilterFrequency = new javax.swing.JComboBox();
        jLabelFilterType = new javax.swing.JLabel();
        jLabelFilterFrequency = new javax.swing.JLabel();
        jDesktopPaneAccelerometer = new javax.swing.JDesktopPane();
        jPanelGyroscope = new javax.swing.JPanel();
        jPanelOptions = new javax.swing.JPanel();
        jPanelOptionMotorTest = new javax.swing.JPanel();
        jLabelOptionsMotorTest = new javax.swing.JLabel();
        jSliderOptionsLeftMotor = new javax.swing.JSlider();
        jSliderOptionsRightMotor = new javax.swing.JSlider();
        jSliderOptionsBothsMotors = new javax.swing.JSlider();
        jLabelOptionsLeftMotor = new javax.swing.JLabel();
        jLabelOptionsRightMotor = new javax.swing.JLabel();
        jLabelOptionsBothsMotors = new javax.swing.JLabel();
        jToggleButtonOptionsStartMotor = new javax.swing.JToggleButton();
        jPanelOptionsAccelerometer = new javax.swing.JPanel();
        jLabelOptionsAccelerometer = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTableOptionsAccelerometer = new javax.swing.JTable();
        jSliderOptionsAccelerometerX = new javax.swing.JSlider();
        jSliderOptionsAccelerometerY = new javax.swing.JSlider();
        jSliderOptionsAccelerometerZ = new javax.swing.JSlider();
        jButtonOptionsAccelerometerCalibrate = new javax.swing.JButton();
        jLabelOptionsAccelerometerMeasurementRange = new javax.swing.JLabel();
        jComboBoxAccelerometerMeasurementRange = new javax.swing.JComboBox();
        jLabelOptionsAccelerometerVdd = new javax.swing.JLabel();
        jComboBoxAccelerometerVdd = new javax.swing.JComboBox();
        jPanelOptionsGyroscope = new javax.swing.JPanel();
        jLabelOptionsGyroscope = new javax.swing.JLabel();
        jButtonOptionsGyroscopeCalibrate = new javax.swing.JButton();
        jPanelDebug = new javax.swing.JPanel();
        jButtonLed = new javax.swing.JButton();
        jTextFieldDebug = new javax.swing.JTextField();
        jButtonSend = new javax.swing.JButton();
        jScrollPaneDebug = new javax.swing.JScrollPane();
        jTextAreaDebug = new javax.swing.JTextArea();
        jToggleButtonUpdate = new javax.swing.JToggleButton();
        jPanelControls = new javax.swing.JPanel();
        jButtonStart = new javax.swing.JButton();
        jButtonStop = new javax.swing.JButton();
        jButtonReset = new javax.swing.JButton();
        jButtonExport = new javax.swing.JButton();
        jButtonImport = new javax.swing.JButton();
        menuBar = new javax.swing.JMenuBar();
        javax.swing.JMenu fileMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
        optionsMenu = new javax.swing.JMenu();
        jMenuPort = new javax.swing.JMenu();
        jRadioButtonMenuItemPortCom1 = new javax.swing.JRadioButtonMenuItem();
        jRadioButtonMenuItemPortCom2 = new javax.swing.JRadioButtonMenuItem();
        jRadioButtonMenuItemPortCom3 = new javax.swing.JRadioButtonMenuItem();
        jMenuBaudrate = new javax.swing.JMenu();
        jRadioButtonMenuItemBaudrate1200 = new javax.swing.JRadioButtonMenuItem();
        jRadioButtonMenuItemBaudrate4800 = new javax.swing.JRadioButtonMenuItem();
        jRadioButtonMenuItemBaudrate9600 = new javax.swing.JRadioButtonMenuItem();
        jRadioButtonMenuItemBaudrate19200 = new javax.swing.JRadioButtonMenuItem();
        jRadioButtonMenuItemBaudrate38400 = new javax.swing.JRadioButtonMenuItem();
        jRadioButtonMenuItemBaudrate57600 = new javax.swing.JRadioButtonMenuItem();
        jRadioButtonMenuItemBaudrate115200 = new javax.swing.JRadioButtonMenuItem();
        jMenuStopBits = new javax.swing.JMenu();
        jRadioButtonMenuItemStopBits1 = new javax.swing.JRadioButtonMenuItem();
        jRadioButtonMenuItemStopBits15 = new javax.swing.JRadioButtonMenuItem();
        jRadioButtonMenuItemStopBits2 = new javax.swing.JRadioButtonMenuItem();
        jMenuDataBits = new javax.swing.JMenu();
        jRadioButtonMenuItemDataBits5 = new javax.swing.JRadioButtonMenuItem();
        jRadioButtonMenuItemDataBits6 = new javax.swing.JRadioButtonMenuItem();
        jRadioButtonMenuItemDataBits7 = new javax.swing.JRadioButtonMenuItem();
        jRadioButtonMenuItemDataBits8 = new javax.swing.JRadioButtonMenuItem();
        jMenuParity = new javax.swing.JMenu();
        jRadioButtonMenuItemParityNone = new javax.swing.JRadioButtonMenuItem();
        jRadioButtonMenuItemParityEven = new javax.swing.JRadioButtonMenuItem();
        jRadioButtonMenuItemParityOdd = new javax.swing.JRadioButtonMenuItem();
        javax.swing.JMenu helpMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
        buttonGroupPort = new javax.swing.ButtonGroup();
        buttonGroupBaudrate = new javax.swing.ButtonGroup();
        buttonGroupStopBits = new javax.swing.ButtonGroup();
        buttonGroupDataBits = new javax.swing.ButtonGroup();
        buttonGroupParity = new javax.swing.ButtonGroup();

        mainPanel.setName("mainPanel"); // NOI18N

        jTabbedPane.setMinimumSize(new java.awt.Dimension(0, 0));
        jTabbedPane.setName("jTabbedPane"); // NOI18N
        jTabbedPane.setPreferredSize(new java.awt.Dimension(0, 0));

        jPanelAngles.setName("jPanelAngles"); // NOI18N

        jPanelAnglesOptions.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanelAnglesOptions.setName("jPanelAnglesOptions"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(cube.CubeApp.class).getContext().getResourceMap(CubeView.class);
        jLabelCube1.setFont(resourceMap.getFont("jLabelCube1.font")); // NOI18N
        jLabelCube1.setText(resourceMap.getString("jLabelCube1.text")); // NOI18N
        jLabelCube1.setName("jLabelCube1"); // NOI18N

        jComboBoxCubeType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "grid", "bw", "colour" }));
        jComboBoxCubeType.setName("jComboBoxCubeType"); // NOI18N
        jComboBoxCubeType.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                changeCubeDesign(evt);
            }
        });

        org.jdesktop.layout.GroupLayout jPanelAnglesOptionsLayout = new org.jdesktop.layout.GroupLayout(jPanelAnglesOptions);
        jPanelAnglesOptions.setLayout(jPanelAnglesOptionsLayout);
        jPanelAnglesOptionsLayout.setHorizontalGroup(
            jPanelAnglesOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelAnglesOptionsLayout.createSequentialGroup()
                .add(20, 20, 20)
                .add(jLabelCube1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 69, Short.MAX_VALUE)
                .add(jComboBoxCubeType, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 104, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanelAnglesOptionsLayout.setVerticalGroup(
            jPanelAnglesOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelAnglesOptionsLayout.createSequentialGroup()
                .add(21, 21, 21)
                .add(jPanelAnglesOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelCube1)
                    .add(jComboBoxCubeType, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(479, Short.MAX_VALUE))
        );

        jDesktopPaneAngles.setBackground(resourceMap.getColor("jDesktopPaneAngles.background")); // NOI18N
        jDesktopPaneAngles.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jDesktopPaneAngles.setName("jDesktopPaneAngles"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanelAnglesLayout = new org.jdesktop.layout.GroupLayout(jPanelAngles);
        jPanelAngles.setLayout(jPanelAnglesLayout);
        jPanelAnglesLayout.setHorizontalGroup(
            jPanelAnglesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelAnglesLayout.createSequentialGroup()
                .addContainerGap()
                .add(jPanelAnglesOptions, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jDesktopPaneAngles)
                .addContainerGap())
        );
        jPanelAnglesLayout.setVerticalGroup(
            jPanelAnglesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanelAnglesLayout.createSequentialGroup()
                .addContainerGap()
                .add(jPanelAnglesLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jDesktopPaneAngles, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 524, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanelAnglesOptions, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        jTabbedPane.addTab(resourceMap.getString("jPanelAngles.TabConstraints.tabTitle"), jPanelAngles); // NOI18N

        jPanelAccelerometer.setName("jPanelAccelerometer"); // NOI18N

        jPanelAccelerationOptions.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanelAccelerationOptions.setName("jPanelAccelerationOptions"); // NOI18N

        jLabelFilter.setFont(resourceMap.getFont("jLabelFilter.font")); // NOI18N
        jLabelFilter.setText(resourceMap.getString("jLabelFilter.text")); // NOI18N
        jLabelFilter.setName("jLabelFilter"); // NOI18N

        jLabelCharts.setFont(resourceMap.getFont("jLabelCharts.font")); // NOI18N
        jLabelCharts.setText(resourceMap.getString("jLabelCharts.text")); // NOI18N
        jLabelCharts.setName("jLabelCharts"); // NOI18N

        jLabelXAxis.setText(resourceMap.getString("jLabelXAxis.text")); // NOI18N
        jLabelXAxis.setName("jLabelXAxis"); // NOI18N

        jLabelFilters.setFont(resourceMap.getFont("jLabelFilters.font")); // NOI18N
        jLabelFilters.setText(resourceMap.getString("jLabelFilters.text")); // NOI18N
        jLabelFilters.setName("jLabelFilters"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(cube.CubeApp.class).getContext().getActionMap(CubeView.class, this);
        jCheckBoxACDXN.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACDXN.setSelected(true);
        jCheckBoxACDXN.setText(resourceMap.getString("jCheckBoxACDXN.text")); // NOI18N
        jCheckBoxACDXN.setName("jCheckBoxACDXN"); // NOI18N

        jCheckBoxACDX1.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACDX1.setText(resourceMap.getString("jCheckBoxACDX1.text")); // NOI18N
        jCheckBoxACDX1.setName("jCheckBoxACDX1"); // NOI18N

        jCheckBoxACDX2.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACDX2.setText(resourceMap.getString("jCheckBoxACDX2.text")); // NOI18N
        jCheckBoxACDX2.setName("jCheckBoxACDX2"); // NOI18N

        jLabelYAxis.setText(resourceMap.getString("jLabelYAxis.text")); // NOI18N
        jLabelYAxis.setName("jLabelYAxis"); // NOI18N

        jCheckBoxACDYN.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACDYN.setSelected(true);
        jCheckBoxACDYN.setName("jCheckBoxACDYN"); // NOI18N

        jCheckBoxACDY1.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACDY1.setName("jCheckBoxACDY1"); // NOI18N

        jCheckBoxACDY2.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACDY2.setName("jCheckBoxACDY2"); // NOI18N

        jLabelZAxis.setText(resourceMap.getString("jLabelZAxis.text")); // NOI18N
        jLabelZAxis.setName("jLabelZAxis"); // NOI18N

        jCheckBoxACDZN.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACDZN.setSelected(true);
        jCheckBoxACDZN.setName("jCheckBoxACDZN"); // NOI18N

        jCheckBoxACDZ1.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACDZ1.setName("jCheckBoxACDZ1"); // NOI18N

        jCheckBoxACDZ2.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACDZ2.setName("jCheckBoxACDZ2"); // NOI18N

        jLabelCharts1.setFont(resourceMap.getFont("jLabelCharts1.font")); // NOI18N
        jLabelCharts1.setText(resourceMap.getString("jLabelCharts1.text")); // NOI18N
        jLabelCharts1.setName("jLabelCharts1"); // NOI18N

        jLabelFilters1.setFont(resourceMap.getFont("jLabelFilters1.font")); // NOI18N
        jLabelFilters1.setText(resourceMap.getString("jLabelFilters1.text")); // NOI18N
        jLabelFilters1.setName("jLabelFilters1"); // NOI18N

        jLabelXAxis1.setText(resourceMap.getString("jLabelXAxis1.text")); // NOI18N
        jLabelXAxis1.setName("jLabelXAxis1"); // NOI18N

        jCheckBoxACLYN.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACLYN.setSelected(true);
        jCheckBoxACLYN.setName("jCheckBoxACLYN"); // NOI18N

        jCheckBoxACLY1.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACLY1.setName("jCheckBoxACLY1"); // NOI18N

        jCheckBoxACLY2.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACLY2.setName("jCheckBoxACLY2"); // NOI18N

        jCheckBoxACLXN.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACLXN.setSelected(true);
        jCheckBoxACLXN.setName("jCheckBoxACLXN"); // NOI18N

        jCheckBoxACLX1.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACLX1.setName("jCheckBoxACLX1"); // NOI18N

        jCheckBoxACLX2.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACLX2.setName("jCheckBoxACLX2"); // NOI18N

        jCheckBoxACLZN.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACLZN.setSelected(true);
        jCheckBoxACLZN.setName("jCheckBoxACLZN"); // NOI18N

        jCheckBoxACLZ1.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxACLZ1.setName("jCheckBoxACLZ1"); // NOI18N

        jCheckBoxLZ2.setAction(actionMap.get("displayCharts")); // NOI18N
        jCheckBoxLZ2.setName("jCheckBoxLZ2"); // NOI18N

        jLabelYAxis1.setText(resourceMap.getString("jLabelYAxis1.text")); // NOI18N
        jLabelYAxis1.setName("jLabelYAxis1"); // NOI18N

        jLabelZAxis1.setText(resourceMap.getString("jLabelZAxis1.text")); // NOI18N
        jLabelZAxis1.setName("jLabelZAxis1"); // NOI18N

        jButtonChartsWithoutFilters.setAction(actionMap.get("displayChartsWithoutFilters")); // NOI18N
        jButtonChartsWithoutFilters.setText(resourceMap.getString("jButtonChartsWithoutFilters.text")); // NOI18N
        jButtonChartsWithoutFilters.setName("jButtonChartsWithoutFilters"); // NOI18N

        jButtonAllDialCharts.setAction(actionMap.get("displayAllDialCharts")); // NOI18N
        jButtonAllDialCharts.setText(resourceMap.getString("jButtonAllDialCharts.text")); // NOI18N
        jButtonAllDialCharts.setName("jButtonAllDialCharts"); // NOI18N

        jButtonClear.setAction(actionMap.get("displayNoCharts")); // NOI18N
        jButtonClear.setText(resourceMap.getString("jButtonClear.text")); // NOI18N
        jButtonClear.setName("jButtonClear"); // NOI18N

        jComboBoxFilterType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "none", "1st order filter", "2nd order filter" }));
        jComboBoxFilterType.setName("jComboBoxFilterType"); // NOI18N

        jComboBoxFilterFrequency.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0.1Hz", "1Hz", "5Hz", "10Hz" }));
        jComboBoxFilterFrequency.setName("jComboBoxFilterFrequency"); // NOI18N

        jLabelFilterType.setText(resourceMap.getString("jLabelFilterType.text")); // NOI18N
        jLabelFilterType.setName("jLabelFilterType"); // NOI18N

        jLabelFilterFrequency.setText(resourceMap.getString("jLabelFilterFrequency.text")); // NOI18N
        jLabelFilterFrequency.setName("jLabelFilterFrequency"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanelAccelerationOptionsLayout = new org.jdesktop.layout.GroupLayout(jPanelAccelerationOptions);
        jPanelAccelerationOptions.setLayout(jPanelAccelerationOptionsLayout);
        jPanelAccelerationOptionsLayout.setHorizontalGroup(
            jPanelAccelerationOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelAccelerationOptionsLayout.createSequentialGroup()
                .addContainerGap()
                .add(jPanelAccelerationOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabelCharts1)
                    .add(jLabelCharts)
                    .add(jPanelAccelerationOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, jLabelFilters)
                        .add(jPanelAccelerationOptionsLayout.createSequentialGroup()
                            .add(jLabelXAxis)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 41, Short.MAX_VALUE)
                            .add(jPanelAccelerationOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(jPanelAccelerationOptionsLayout.createSequentialGroup()
                                    .add(jCheckBoxACDYN)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(jCheckBoxACDY1)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(jCheckBoxACDY2))
                                .add(jPanelAccelerationOptionsLayout.createSequentialGroup()
                                    .add(jCheckBoxACDXN)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(jCheckBoxACDX1)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(jCheckBoxACDX2))
                                .add(jPanelAccelerationOptionsLayout.createSequentialGroup()
                                    .add(jCheckBoxACDZN)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(jCheckBoxACDZ1)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(jCheckBoxACDZ2))
                                .add(jPanelAccelerationOptionsLayout.createSequentialGroup()
                                    .add(jCheckBoxACLZN)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(jCheckBoxACLZ1)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(jCheckBoxLZ2))
                                .add(jPanelAccelerationOptionsLayout.createSequentialGroup()
                                    .add(jCheckBoxACLYN)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(jCheckBoxACLY1)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(jCheckBoxACLY2))
                                .add(jPanelAccelerationOptionsLayout.createSequentialGroup()
                                    .add(jCheckBoxACLXN)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(jCheckBoxACLX1)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(jCheckBoxACLX2)))))
                    .add(jLabelYAxis)
                    .add(jLabelZAxis)
                    .add(jLabelFilter)
                    .add(jButtonAllDialCharts)
                    .add(jButtonClear)
                    .add(jButtonChartsWithoutFilters)
                    .add(jPanelAccelerationOptionsLayout.createSequentialGroup()
                        .add(jLabelFilterFrequency)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 46, Short.MAX_VALUE)
                        .add(jComboBoxFilterFrequency, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(jLabelFilters1)
                    .add(jLabelXAxis1)
                    .add(jLabelYAxis1)
                    .add(jLabelZAxis1)
                    .add(jPanelAccelerationOptionsLayout.createSequentialGroup()
                        .add(jLabelFilterType)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 32, Short.MAX_VALUE)
                        .add(jComboBoxFilterType, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanelAccelerationOptionsLayout.setVerticalGroup(
            jPanelAccelerationOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelAccelerationOptionsLayout.createSequentialGroup()
                .addContainerGap()
                .add(jLabelFilter)
                .add(12, 12, 12)
                .add(jPanelAccelerationOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelFilterType)
                    .add(jComboBoxFilterType, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanelAccelerationOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelFilterFrequency)
                    .add(jComboBoxFilterFrequency, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jLabelCharts)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabelFilters)
                .add(9, 9, 9)
                .add(jPanelAccelerationOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelXAxis)
                    .add(jCheckBoxACDXN)
                    .add(jCheckBoxACDX1)
                    .add(jCheckBoxACDX2))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanelAccelerationOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelYAxis)
                    .add(jCheckBoxACDYN)
                    .add(jCheckBoxACDY1)
                    .add(jCheckBoxACDY2))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanelAccelerationOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelZAxis)
                    .add(jCheckBoxACDZN)
                    .add(jCheckBoxACDZ1)
                    .add(jCheckBoxACDZ2))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabelCharts1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabelFilters1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanelAccelerationOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jPanelAccelerationOptionsLayout.createSequentialGroup()
                        .add(jLabelXAxis1)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLabelYAxis1)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanelAccelerationOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabelZAxis1)
                            .add(jCheckBoxACLZN)
                            .add(jCheckBoxACLZ1)
                            .add(jCheckBoxLZ2)))
                    .add(jPanelAccelerationOptionsLayout.createSequentialGroup()
                        .add(jPanelAccelerationOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jCheckBoxACLXN)
                            .add(jCheckBoxACLX1)
                            .add(jCheckBoxACLX2))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanelAccelerationOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jCheckBoxACLYN)
                            .add(jCheckBoxACLY1)
                            .add(jCheckBoxACLY2))
                        .add(23, 23, 23)))
                .add(52, 52, 52)
                .add(jButtonChartsWithoutFilters)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jButtonAllDialCharts)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jButtonClear)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jDesktopPaneAccelerometer.setBackground(resourceMap.getColor("jDesktopPaneAccelerometer.background")); // NOI18N
        jDesktopPaneAccelerometer.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jDesktopPaneAccelerometer.setName("jDesktopPaneAccelerometer"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanelAccelerometerLayout = new org.jdesktop.layout.GroupLayout(jPanelAccelerometer);
        jPanelAccelerometer.setLayout(jPanelAccelerometerLayout);
        jPanelAccelerometerLayout.setHorizontalGroup(
            jPanelAccelerometerLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelAccelerometerLayout.createSequentialGroup()
                .addContainerGap()
                .add(jPanelAccelerationOptions, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jDesktopPaneAccelerometer, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 939, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanelAccelerometerLayout.setVerticalGroup(
            jPanelAccelerometerLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanelAccelerometerLayout.createSequentialGroup()
                .add(20, 20, 20)
                .add(jPanelAccelerometerLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jDesktopPaneAccelerometer, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 524, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanelAccelerationOptions, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        jTabbedPane.addTab(resourceMap.getString("jPanelAccelerometer.TabConstraints.tabTitle"), jPanelAccelerometer); // NOI18N

        jPanelGyroscope.setName("jPanelGyroscope"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanelGyroscopeLayout = new org.jdesktop.layout.GroupLayout(jPanelGyroscope);
        jPanelGyroscope.setLayout(jPanelGyroscopeLayout);
        jPanelGyroscopeLayout.setHorizontalGroup(
            jPanelGyroscopeLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 1239, Short.MAX_VALUE)
        );
        jPanelGyroscopeLayout.setVerticalGroup(
            jPanelGyroscopeLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 564, Short.MAX_VALUE)
        );

        jTabbedPane.addTab(resourceMap.getString("jPanelGyroscope.TabConstraints.tabTitle"), jPanelGyroscope); // NOI18N

        jPanelOptions.setName("jPanelOptions"); // NOI18N

        jPanelOptionMotorTest.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanelOptionMotorTest.setName("jPanelOptionMotorTest"); // NOI18N

        jLabelOptionsMotorTest.setText(resourceMap.getString("jLabelOptionsMotorTest.text")); // NOI18N
        jLabelOptionsMotorTest.setName("jLabelOptionsMotorTest"); // NOI18N

        jSliderOptionsLeftMotor.setName("jSliderOptionsLeftMotor"); // NOI18N

        jSliderOptionsRightMotor.setName("jSliderOptionsRightMotor"); // NOI18N

        jSliderOptionsBothsMotors.setName("jSliderOptionsBothsMotors"); // NOI18N

        jLabelOptionsLeftMotor.setText(resourceMap.getString("jLabelOptionsLeftMotor.text")); // NOI18N
        jLabelOptionsLeftMotor.setName("jLabelOptionsLeftMotor"); // NOI18N

        jLabelOptionsRightMotor.setText(resourceMap.getString("jLabelOptionsRightMotor.text")); // NOI18N
        jLabelOptionsRightMotor.setName("jLabelOptionsRightMotor"); // NOI18N

        jLabelOptionsBothsMotors.setText(resourceMap.getString("jLabelOptionsBothsMotors.text")); // NOI18N
        jLabelOptionsBothsMotors.setName("jLabelOptionsBothsMotors"); // NOI18N

        jToggleButtonOptionsStartMotor.setText(resourceMap.getString("jToggleButtonOptionsStartMotor.text")); // NOI18N
        jToggleButtonOptionsStartMotor.setName("jToggleButtonOptionsStartMotor"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanelOptionMotorTestLayout = new org.jdesktop.layout.GroupLayout(jPanelOptionMotorTest);
        jPanelOptionMotorTest.setLayout(jPanelOptionMotorTestLayout);
        jPanelOptionMotorTestLayout.setHorizontalGroup(
            jPanelOptionMotorTestLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelOptionMotorTestLayout.createSequentialGroup()
                .addContainerGap()
                .add(jPanelOptionMotorTestLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanelOptionMotorTestLayout.createSequentialGroup()
                        .add(jPanelOptionMotorTestLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jSliderOptionsLeftMotor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jSliderOptionsRightMotor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jSliderOptionsBothsMotors, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(27, 27, 27)
                        .add(jPanelOptionMotorTestLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jPanelOptionMotorTestLayout.createSequentialGroup()
                                .add(jLabelOptionsBothsMotors)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 46, Short.MAX_VALUE)
                                .add(jToggleButtonOptionsStartMotor))
                            .add(jLabelOptionsRightMotor)
                            .add(jLabelOptionsLeftMotor)))
                    .add(jLabelOptionsMotorTest))
                .addContainerGap())
        );
        jPanelOptionMotorTestLayout.setVerticalGroup(
            jPanelOptionMotorTestLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanelOptionMotorTestLayout.createSequentialGroup()
                .addContainerGap()
                .add(jPanelOptionMotorTestLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jToggleButtonOptionsStartMotor)
                    .add(jPanelOptionMotorTestLayout.createSequentialGroup()
                        .add(jLabelOptionsMotorTest)
                        .add(32, 32, 32)
                        .add(jPanelOptionMotorTestLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jSliderOptionsLeftMotor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jLabelOptionsLeftMotor))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanelOptionMotorTestLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jPanelOptionMotorTestLayout.createSequentialGroup()
                                .add(jLabelOptionsRightMotor)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 95, Short.MAX_VALUE)
                                .add(jLabelOptionsBothsMotors))
                            .add(jPanelOptionMotorTestLayout.createSequentialGroup()
                                .add(jSliderOptionsRightMotor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 69, Short.MAX_VALUE)
                                .add(jSliderOptionsBothsMotors, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))))
                .add(51, 51, 51))
        );

        jPanelOptionsAccelerometer.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanelOptionsAccelerometer.setName("jPanelOptionsAccelerometer"); // NOI18N

        jLabelOptionsAccelerometer.setFont(resourceMap.getFont("jLabelOptionsAccelerometer.font")); // NOI18N
        jLabelOptionsAccelerometer.setText(resourceMap.getString("jLabelOptionsAccelerometer.text")); // NOI18N
        jLabelOptionsAccelerometer.setName("jLabelOptionsAccelerometer"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jTableOptionsAccelerometer.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {},
                {},
                {},
                {}
            },
            new String [] {

            }
        ));
        jTableOptionsAccelerometer.setName("jTableOptionsAccelerometer"); // NOI18N
        jScrollPane1.setViewportView(jTableOptionsAccelerometer);

        jSliderOptionsAccelerometerX.setName("jSliderOptionsAccelerometerX"); // NOI18N

        jSliderOptionsAccelerometerY.setName("jSliderOptionsAccelerometerY"); // NOI18N

        jSliderOptionsAccelerometerZ.setName("jSliderOptionsAccelerometerZ"); // NOI18N

        jButtonOptionsAccelerometerCalibrate.setText(resourceMap.getString("jButtonOptionsAccelerometerCalibrate.text")); // NOI18N
        jButtonOptionsAccelerometerCalibrate.setName("jButtonOptionsAccelerometerCalibrate"); // NOI18N

        jLabelOptionsAccelerometerMeasurementRange.setText(resourceMap.getString("jLabelOptionsAccelerometerMeasurementRange.text")); // NOI18N
        jLabelOptionsAccelerometerMeasurementRange.setName("jLabelOptionsAccelerometerMeasurementRange"); // NOI18N

        jComboBoxAccelerometerMeasurementRange.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2 g", "6 g" }));
        jComboBoxAccelerometerMeasurementRange.setName("jComboBoxAccelerometerMeasurementRange"); // NOI18N
        jComboBoxAccelerometerMeasurementRange.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                changeAccelerometerOptions(evt);
            }
        });

        jLabelOptionsAccelerometerVdd.setText(resourceMap.getString("jLabelOptionsAccelerometerVdd.text")); // NOI18N
        jLabelOptionsAccelerometerVdd.setName("jLabelOptionsAccelerometerVdd"); // NOI18N

        jComboBoxAccelerometerVdd.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2.5 V", "3.3 V" }));
        jComboBoxAccelerometerVdd.setName("jComboBoxAccelerometerVdd"); // NOI18N
        jComboBoxAccelerometerVdd.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                changeAccelerometerOptions(evt);
            }
        });

        org.jdesktop.layout.GroupLayout jPanelOptionsAccelerometerLayout = new org.jdesktop.layout.GroupLayout(jPanelOptionsAccelerometer);
        jPanelOptionsAccelerometer.setLayout(jPanelOptionsAccelerometerLayout);
        jPanelOptionsAccelerometerLayout.setHorizontalGroup(
            jPanelOptionsAccelerometerLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelOptionsAccelerometerLayout.createSequentialGroup()
                .add(jPanelOptionsAccelerometerLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanelOptionsAccelerometerLayout.createSequentialGroup()
                        .add(145, 145, 145)
                        .add(jPanelOptionsAccelerometerLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jSliderOptionsAccelerometerY, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jSliderOptionsAccelerometerX, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jPanelOptionsAccelerometerLayout.createSequentialGroup()
                                .add(jSliderOptionsAccelerometerZ, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 271, Short.MAX_VALUE)
                                .add(jButtonOptionsAccelerometerCalibrate))))
                    .add(jPanelOptionsAccelerometerLayout.createSequentialGroup()
                        .addContainerGap()
                        .add(jPanelOptionsAccelerometerLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabelOptionsAccelerometer)
                            .add(jPanelOptionsAccelerometerLayout.createSequentialGroup()
                                .add(jLabelOptionsAccelerometerVdd)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(jComboBoxAccelerometerVdd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(79, 79, 79)
                                .add(jLabelOptionsAccelerometerMeasurementRange)
                                .add(11, 11, 11)
                                .add(jComboBoxAccelerometerMeasurementRange, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                        .add(274, 274, 274))
                    .add(jPanelOptionsAccelerometerLayout.createSequentialGroup()
                        .addContainerGap()
                        .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 669, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanelOptionsAccelerometerLayout.setVerticalGroup(
            jPanelOptionsAccelerometerLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelOptionsAccelerometerLayout.createSequentialGroup()
                .addContainerGap()
                .add(jLabelOptionsAccelerometer)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jPanelOptionsAccelerometerLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabelOptionsAccelerometerVdd)
                    .add(jLabelOptionsAccelerometerMeasurementRange)
                    .add(jComboBoxAccelerometerMeasurementRange, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jComboBoxAccelerometerVdd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 152, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(37, 37, 37)
                .add(jPanelOptionsAccelerometerLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jPanelOptionsAccelerometerLayout.createSequentialGroup()
                        .add(jSliderOptionsAccelerometerX, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jSliderOptionsAccelerometerY, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                        .add(jSliderOptionsAccelerometerZ, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(21, 21, 21))
                    .add(jPanelOptionsAccelerometerLayout.createSequentialGroup()
                        .add(jButtonOptionsAccelerometerCalibrate)
                        .addContainerGap())))
        );

        jPanelOptionsGyroscope.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanelOptionsGyroscope.setName("jPanelOptionsGyroscope"); // NOI18N

        jLabelOptionsGyroscope.setText(resourceMap.getString("jLabelOptionsGyroscope.text")); // NOI18N
        jLabelOptionsGyroscope.setName("jLabelOptionsGyroscope"); // NOI18N

        jButtonOptionsGyroscopeCalibrate.setText(resourceMap.getString("jButtonOptionsGyroscopeCalibrate.text")); // NOI18N
        jButtonOptionsGyroscopeCalibrate.setName("jButtonOptionsGyroscopeCalibrate"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanelOptionsGyroscopeLayout = new org.jdesktop.layout.GroupLayout(jPanelOptionsGyroscope);
        jPanelOptionsGyroscope.setLayout(jPanelOptionsGyroscopeLayout);
        jPanelOptionsGyroscopeLayout.setHorizontalGroup(
            jPanelOptionsGyroscopeLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelOptionsGyroscopeLayout.createSequentialGroup()
                .addContainerGap()
                .add(jLabelOptionsGyroscope)
                .addContainerGap(635, Short.MAX_VALUE))
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanelOptionsGyroscopeLayout.createSequentialGroup()
                .addContainerGap(606, Short.MAX_VALUE)
                .add(jButtonOptionsGyroscopeCalibrate)
                .addContainerGap())
        );
        jPanelOptionsGyroscopeLayout.setVerticalGroup(
            jPanelOptionsGyroscopeLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelOptionsGyroscopeLayout.createSequentialGroup()
                .addContainerGap()
                .add(jLabelOptionsGyroscope)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jButtonOptionsGyroscopeCalibrate)
                .add(25, 25, 25))
        );

        org.jdesktop.layout.GroupLayout jPanelOptionsLayout = new org.jdesktop.layout.GroupLayout(jPanelOptions);
        jPanelOptions.setLayout(jPanelOptionsLayout);
        jPanelOptionsLayout.setHorizontalGroup(
            jPanelOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelOptionsLayout.createSequentialGroup()
                .addContainerGap()
                .add(jPanelOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanelOptionsGyroscope, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanelOptionsAccelerometer, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .add(18, 18, 18)
                .add(jPanelOptionMotorTest, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanelOptionsLayout.setVerticalGroup(
            jPanelOptionsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelOptionsLayout.createSequentialGroup()
                .add(jPanelOptionsAccelerometer, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(14, 14, 14)
                .add(jPanelOptionsGyroscope, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(119, 119, 119))
            .add(jPanelOptionsLayout.createSequentialGroup()
                .add(jPanelOptionMotorTest, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        jTabbedPane.addTab(resourceMap.getString("jPanelOptions.TabConstraints.tabTitle"), jPanelOptions); // NOI18N

        jPanelDebug.setName("jPanelDebug"); // NOI18N

        jButtonLed.setAction(actionMap.get("pushLedButton")); // NOI18N
        jButtonLed.setText(resourceMap.getString("jButtonLed.text")); // NOI18N
        jButtonLed.setName("jButtonLed"); // NOI18N

        jTextFieldDebug.setText(resourceMap.getString("jTextFieldDebug.text")); // NOI18N
        jTextFieldDebug.setName("jTextFieldDebug"); // NOI18N

        jButtonSend.setText(resourceMap.getString("jButtonSend.text")); // NOI18N
        jButtonSend.setName("jButtonSend"); // NOI18N

        jScrollPaneDebug.setName("jScrollPaneDebug"); // NOI18N

        jTextAreaDebug.setColumns(20);
        jTextAreaDebug.setRows(5);
        jTextAreaDebug.setName("jTextAreaDebug"); // NOI18N
        jScrollPaneDebug.setViewportView(jTextAreaDebug);

        jToggleButtonUpdate.setAction(actionMap.get("log")); // NOI18N
        jToggleButtonUpdate.setText(resourceMap.getString("jToggleButtonUpdate.text")); // NOI18N
        jToggleButtonUpdate.setName("jToggleButtonUpdate"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanelDebugLayout = new org.jdesktop.layout.GroupLayout(jPanelDebug);
        jPanelDebug.setLayout(jPanelDebugLayout);
        jPanelDebugLayout.setHorizontalGroup(
            jPanelDebugLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelDebugLayout.createSequentialGroup()
                .addContainerGap()
                .add(jPanelDebugLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jScrollPaneDebug, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1199, Short.MAX_VALUE)
                    .add(jPanelDebugLayout.createSequentialGroup()
                        .add(jTextFieldDebug, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 176, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jButtonSend))
                    .add(jButtonLed)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jToggleButtonUpdate))
                .addContainerGap())
        );
        jPanelDebugLayout.setVerticalGroup(
            jPanelDebugLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelDebugLayout.createSequentialGroup()
                .addContainerGap()
                .add(jButtonLed)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jPanelDebugLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jTextFieldDebug, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jButtonSend))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jScrollPaneDebug, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 430, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jToggleButtonUpdate)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane.addTab(resourceMap.getString("jPanelDebug.TabConstraints.tabTitle"), jPanelDebug); // NOI18N

        jPanelControls.setMaximumSize(new java.awt.Dimension(0, 0));
        jPanelControls.setName("jPanelControls"); // NOI18N

        jButtonStart.setAction(actionMap.get("start")); // NOI18N
        jButtonStart.setText(resourceMap.getString("jButtonStart.text")); // NOI18N
        jButtonStart.setName("jButtonStart"); // NOI18N

        jButtonStop.setAction(actionMap.get("stop")); // NOI18N
        jButtonStop.setText(resourceMap.getString("jButtonStop.text")); // NOI18N
        jButtonStop.setName("jButtonStop"); // NOI18N

        jButtonReset.setAction(actionMap.get("reset")); // NOI18N
        jButtonReset.setText(resourceMap.getString("jButtonReset.text")); // NOI18N
        jButtonReset.setName("jButtonReset"); // NOI18N

        jButtonExport.setAction(actionMap.get("exportValues")); // NOI18N
        jButtonExport.setText(resourceMap.getString("jButtonExport.text")); // NOI18N
        jButtonExport.setName("jButtonExport"); // NOI18N

        jButtonImport.setAction(actionMap.get("importValues")); // NOI18N
        jButtonImport.setText(resourceMap.getString("jButtonImport.text")); // NOI18N
        jButtonImport.setName("jButtonImport"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanelControlsLayout = new org.jdesktop.layout.GroupLayout(jPanelControls);
        jPanelControls.setLayout(jPanelControlsLayout);
        jPanelControlsLayout.setHorizontalGroup(
            jPanelControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelControlsLayout.createSequentialGroup()
                .addContainerGap()
                .add(jButtonStart)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jButtonStop)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jButtonReset)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 847, Short.MAX_VALUE)
                .add(jButtonExport)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jButtonImport))
        );
        jPanelControlsLayout.setVerticalGroup(
            jPanelControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelControlsLayout.createSequentialGroup()
                .add(jPanelControlsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jButtonStart)
                    .add(jButtonStop)
                    .add(jButtonReset)
                    .add(jButtonImport)
                    .add(jButtonExport))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        org.jdesktop.layout.GroupLayout mainPanelLayout = new org.jdesktop.layout.GroupLayout(mainPanel);
        mainPanel.setLayout(mainPanelLayout);
        mainPanelLayout.setHorizontalGroup(
            mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, mainPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanelControls, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jTabbedPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1260, Short.MAX_VALUE))
                .addContainerGap())
        );
        mainPanelLayout.setVerticalGroup(
            mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, mainPanelLayout.createSequentialGroup()
                .add(10, 10, 10)
                .add(jTabbedPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 610, Short.MAX_VALUE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanelControls, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        menuBar.setName("menuBar"); // NOI18N

        fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N
        fileMenu.setName("fileMenu"); // NOI18N

        exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
        exitMenuItem.setName("exitMenuItem"); // NOI18N
        fileMenu.add(exitMenuItem);

        menuBar.add(fileMenu);

        optionsMenu.setText(resourceMap.getString("optionsMenu.text")); // NOI18N
        optionsMenu.setName("optionsMenu"); // NOI18N

        jMenuPort.setText(resourceMap.getString("jMenuPort.text")); // NOI18N
        jMenuPort.setName("jMenuPort"); // NOI18N

        jRadioButtonMenuItemPortCom1.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupPort.add(jRadioButtonMenuItemPortCom1);
        jRadioButtonMenuItemPortCom1.setSelected(true);
        jRadioButtonMenuItemPortCom1.setText(resourceMap.getString("jRadioButtonMenuItemPortCom1.text")); // NOI18N
        jRadioButtonMenuItemPortCom1.setName("jRadioButtonMenuItemPortCom1"); // NOI18N
        jMenuPort.add(jRadioButtonMenuItemPortCom1);

        jRadioButtonMenuItemPortCom2.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupPort.add(jRadioButtonMenuItemPortCom2);
        jRadioButtonMenuItemPortCom2.setText(resourceMap.getString("jRadioButtonMenuItemPortCom2.text")); // NOI18N
        jRadioButtonMenuItemPortCom2.setName("jRadioButtonMenuItemPortCom2"); // NOI18N
        jMenuPort.add(jRadioButtonMenuItemPortCom2);

        jRadioButtonMenuItemPortCom3.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupPort.add(jRadioButtonMenuItemPortCom3);
        jRadioButtonMenuItemPortCom3.setText(resourceMap.getString("jRadioButtonMenuItemPortCom3.text")); // NOI18N
        jRadioButtonMenuItemPortCom3.setName("jRadioButtonMenuItemPortCom3"); // NOI18N
        jMenuPort.add(jRadioButtonMenuItemPortCom3);

        optionsMenu.add(jMenuPort);

        jMenuBaudrate.setText(resourceMap.getString("jMenuBaudrate.text")); // NOI18N
        jMenuBaudrate.setName("jMenuBaudrate"); // NOI18N

        jRadioButtonMenuItemBaudrate1200.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupBaudrate.add(jRadioButtonMenuItemBaudrate1200);
        jRadioButtonMenuItemBaudrate1200.setText(resourceMap.getString("jRadioButtonMenuItemBaudrate1200.text")); // NOI18N
        jRadioButtonMenuItemBaudrate1200.setName("jRadioButtonMenuItemBaudrate1200"); // NOI18N
        jMenuBaudrate.add(jRadioButtonMenuItemBaudrate1200);

        jRadioButtonMenuItemBaudrate4800.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupBaudrate.add(jRadioButtonMenuItemBaudrate4800);
        jRadioButtonMenuItemBaudrate4800.setText(resourceMap.getString("jRadioButtonMenuItemBaudrate4800.text")); // NOI18N
        jRadioButtonMenuItemBaudrate4800.setName("jRadioButtonMenuItemBaudrate4800"); // NOI18N
        jMenuBaudrate.add(jRadioButtonMenuItemBaudrate4800);

        jRadioButtonMenuItemBaudrate9600.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupBaudrate.add(jRadioButtonMenuItemBaudrate9600);
        jRadioButtonMenuItemBaudrate9600.setText(resourceMap.getString("jRadioButtonMenuItemBaudrate9600.text")); // NOI18N
        jRadioButtonMenuItemBaudrate9600.setName("jRadioButtonMenuItemBaudrate9600"); // NOI18N
        jMenuBaudrate.add(jRadioButtonMenuItemBaudrate9600);

        jRadioButtonMenuItemBaudrate19200.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupBaudrate.add(jRadioButtonMenuItemBaudrate19200);
        jRadioButtonMenuItemBaudrate19200.setSelected(true);
        jRadioButtonMenuItemBaudrate19200.setText(resourceMap.getString("jRadioButtonMenuItemBaudrate19200.text")); // NOI18N
        jRadioButtonMenuItemBaudrate19200.setName("jRadioButtonMenuItemBaudrate19200"); // NOI18N
        jMenuBaudrate.add(jRadioButtonMenuItemBaudrate19200);

        jRadioButtonMenuItemBaudrate38400.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupBaudrate.add(jRadioButtonMenuItemBaudrate38400);
        jRadioButtonMenuItemBaudrate38400.setText(resourceMap.getString("jRadioButtonMenuItemBaudrate38400.text")); // NOI18N
        jRadioButtonMenuItemBaudrate38400.setName("jRadioButtonMenuItemBaudrate38400"); // NOI18N
        jMenuBaudrate.add(jRadioButtonMenuItemBaudrate38400);

        jRadioButtonMenuItemBaudrate57600.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupBaudrate.add(jRadioButtonMenuItemBaudrate57600);
        jRadioButtonMenuItemBaudrate57600.setText(resourceMap.getString("jRadioButtonMenuItemBaudrate57600.text")); // NOI18N
        jRadioButtonMenuItemBaudrate57600.setName("jRadioButtonMenuItemBaudrate57600"); // NOI18N
        jMenuBaudrate.add(jRadioButtonMenuItemBaudrate57600);

        jRadioButtonMenuItemBaudrate115200.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupBaudrate.add(jRadioButtonMenuItemBaudrate115200);
        jRadioButtonMenuItemBaudrate115200.setText(resourceMap.getString("jRadioButtonMenuItemBaudrate115200.text")); // NOI18N
        jRadioButtonMenuItemBaudrate115200.setName("jRadioButtonMenuItemBaudrate115200"); // NOI18N
        jMenuBaudrate.add(jRadioButtonMenuItemBaudrate115200);

        optionsMenu.add(jMenuBaudrate);

        jMenuStopBits.setText(resourceMap.getString("jMenuStopBits.text")); // NOI18N
        jMenuStopBits.setName("jMenuStopBits"); // NOI18N

        jRadioButtonMenuItemStopBits1.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupStopBits.add(jRadioButtonMenuItemStopBits1);
        jRadioButtonMenuItemStopBits1.setSelected(true);
        jRadioButtonMenuItemStopBits1.setText(resourceMap.getString("jRadioButtonMenuItemStopBits1.text")); // NOI18N
        jRadioButtonMenuItemStopBits1.setName("jRadioButtonMenuItemStopBits1"); // NOI18N
        jMenuStopBits.add(jRadioButtonMenuItemStopBits1);

        jRadioButtonMenuItemStopBits15.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupStopBits.add(jRadioButtonMenuItemStopBits15);
        jRadioButtonMenuItemStopBits15.setText(resourceMap.getString("jRadioButtonMenuItemStopBits15.text")); // NOI18N
        jRadioButtonMenuItemStopBits15.setName("jRadioButtonMenuItemStopBits15"); // NOI18N
        jMenuStopBits.add(jRadioButtonMenuItemStopBits15);

        jRadioButtonMenuItemStopBits2.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupStopBits.add(jRadioButtonMenuItemStopBits2);
        jRadioButtonMenuItemStopBits2.setText(resourceMap.getString("jRadioButtonMenuItemStopBits2.text")); // NOI18N
        jRadioButtonMenuItemStopBits2.setName("jRadioButtonMenuItemStopBits2"); // NOI18N
        jMenuStopBits.add(jRadioButtonMenuItemStopBits2);

        optionsMenu.add(jMenuStopBits);

        jMenuDataBits.setText(resourceMap.getString("jMenuDataBits.text")); // NOI18N
        jMenuDataBits.setName("jMenuDataBits"); // NOI18N

        jRadioButtonMenuItemDataBits5.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupDataBits.add(jRadioButtonMenuItemDataBits5);
        jRadioButtonMenuItemDataBits5.setText(resourceMap.getString("jRadioButtonMenuItemDataBits5.text")); // NOI18N
        jRadioButtonMenuItemDataBits5.setName("jRadioButtonMenuItemDataBits5"); // NOI18N
        jMenuDataBits.add(jRadioButtonMenuItemDataBits5);

        jRadioButtonMenuItemDataBits6.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupDataBits.add(jRadioButtonMenuItemDataBits6);
        jRadioButtonMenuItemDataBits6.setText(resourceMap.getString("jRadioButtonMenuItemDataBits6.text")); // NOI18N
        jRadioButtonMenuItemDataBits6.setName("jRadioButtonMenuItemDataBits6"); // NOI18N
        jMenuDataBits.add(jRadioButtonMenuItemDataBits6);

        jRadioButtonMenuItemDataBits7.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupDataBits.add(jRadioButtonMenuItemDataBits7);
        jRadioButtonMenuItemDataBits7.setText(resourceMap.getString("jRadioButtonMenuItemDataBits7.text")); // NOI18N
        jRadioButtonMenuItemDataBits7.setName("jRadioButtonMenuItemDataBits7"); // NOI18N
        jMenuDataBits.add(jRadioButtonMenuItemDataBits7);

        jRadioButtonMenuItemDataBits8.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupDataBits.add(jRadioButtonMenuItemDataBits8);
        jRadioButtonMenuItemDataBits8.setSelected(true);
        jRadioButtonMenuItemDataBits8.setText(resourceMap.getString("jRadioButtonMenuItemDataBits8.text")); // NOI18N
        jRadioButtonMenuItemDataBits8.setName("jRadioButtonMenuItemDataBits8"); // NOI18N
        jMenuDataBits.add(jRadioButtonMenuItemDataBits8);

        optionsMenu.add(jMenuDataBits);

        jMenuParity.setText(resourceMap.getString("jMenuParity.text")); // NOI18N
        jMenuParity.setName("jMenuParity"); // NOI18N

        jRadioButtonMenuItemParityNone.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupParity.add(jRadioButtonMenuItemParityNone);
        jRadioButtonMenuItemParityNone.setSelected(true);
        jRadioButtonMenuItemParityNone.setText(resourceMap.getString("jRadioButtonMenuItemParityNone.text")); // NOI18N
        jRadioButtonMenuItemParityNone.setName("jRadioButtonMenuItemParityNone"); // NOI18N
        jMenuParity.add(jRadioButtonMenuItemParityNone);

        jRadioButtonMenuItemParityEven.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupParity.add(jRadioButtonMenuItemParityEven);
        jRadioButtonMenuItemParityEven.setText(resourceMap.getString("jRadioButtonMenuItemParityEven.text")); // NOI18N
        jRadioButtonMenuItemParityEven.setName("jRadioButtonMenuItemParityEven"); // NOI18N
        jMenuParity.add(jRadioButtonMenuItemParityEven);

        jRadioButtonMenuItemParityOdd.setAction(actionMap.get("setConfiguration")); // NOI18N
        buttonGroupParity.add(jRadioButtonMenuItemParityOdd);
        jRadioButtonMenuItemParityOdd.setText(resourceMap.getString("jRadioButtonMenuItemParityOdd.text")); // NOI18N
        jRadioButtonMenuItemParityOdd.setName("jRadioButtonMenuItemParityOdd"); // NOI18N
        jMenuParity.add(jRadioButtonMenuItemParityOdd);

        optionsMenu.add(jMenuParity);

        menuBar.add(optionsMenu);

        helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
        helpMenu.setName("helpMenu"); // NOI18N

        aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N
        aboutMenuItem.setName("aboutMenuItem"); // NOI18N
        helpMenu.add(aboutMenuItem);

        menuBar.add(helpMenu);

        setComponent(mainPanel);
        setMenuBar(menuBar);
    }// </editor-fold>//GEN-END:initComponents

private void changeCubeDesign(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_changeCubeDesign
        ((CubeChart)chartManager.getHashtableOfCharts().get("ANC")).setDesign(evt.getItem().toString());
        ((CubeChart)chartManager.getHashtableOfCharts().get("ANC")).repaint();
}//GEN-LAST:event_changeCubeDesign

private void changeAccelerometerOptions(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_changeAccelerometerOptions
    // TODO add your handling code here:
        if (evt.getItem().toString().equals("2 g")) 
            accelerationSensor.setMeasurementRange(2);
        else if (evt.getItem().toString().equals("6 g"))
            accelerationSensor.setMeasurementRange(6);
        else if (evt.getItem().toString().equals("2.5 V"))
            accelerationSensor.setVdd(2.5);
        else if (evt.getItem().toString().equals("3.3 V"))
            accelerationSensor.setVdd(3.3);
        updateAccelerationSensorOptions();
}//GEN-LAST:event_changeAccelerometerOptions


    @Action
    public void pushLedButton() {
        if (jButtonLed.getText().equals("LED on")){
            jButtonLed.setText("LED off");
            log.debug("Set LED off");
            serialConnection.send("s");
        } else {
            jButtonLed.setText("LED on");
            log.debug("Set LED on");
            serialConnection.send("s");       
        }
    }

    @Action
    public void log() {
        String record = null;
        int recCount = 0; 

        try { 
           jTextAreaDebug.setText("");
	   FileReader fr     = new FileReader("debug.log");
           BufferedReader br = new BufferedReader(fr);

           record = new String();
           while ((record = br.readLine()) != null) {
              recCount++;
              jTextAreaDebug.setText(jTextAreaDebug.getText() + recCount + ": " + record +"\n");
           } 

        } catch (IOException e) { 
           // catch possible io errors from readLine()
            log.debug("Uh oh, got an IOException error!");
           e.printStackTrace();
        }
    }

    @Action
    public void setConfiguration() {
        if (jRadioButtonMenuItemPortCom1.isSelected()) { serialConnection.setPort("COM1");} 
        if (jRadioButtonMenuItemPortCom2.isSelected()) { serialConnection.setPort("COM2");} 
        if (jRadioButtonMenuItemPortCom3.isSelected()) { serialConnection.setPort("COM3");}
        if (jRadioButtonMenuItemBaudrate1200.isSelected()) { serialConnection.setBaudrate(1200);}
        if (jRadioButtonMenuItemBaudrate4800.isSelected()) { serialConnection.setBaudrate(4800);}
        if (jRadioButtonMenuItemBaudrate9600.isSelected()) { serialConnection.setBaudrate(9600);}
        if (jRadioButtonMenuItemBaudrate19200.isSelected()) { serialConnection.setBaudrate(19200);}
        if (jRadioButtonMenuItemBaudrate38400.isSelected()) { serialConnection.setBaudrate(38400);}
        if (jRadioButtonMenuItemBaudrate57600.isSelected()) { serialConnection.setBaudrate(57600);}
        if (jRadioButtonMenuItemBaudrate115200.isSelected()) { serialConnection.setBaudrate(115200);}
        if (jRadioButtonMenuItemStopBits1.isSelected()) { serialConnection.setStopBits(1);}
        if (jRadioButtonMenuItemStopBits15.isSelected()) { serialConnection.setStopBits(1.5);}
        if (jRadioButtonMenuItemStopBits2.isSelected()) { serialConnection.setStopBits(2);}
        if (jRadioButtonMenuItemDataBits5.isSelected()) { serialConnection.setDataBits(5);}
        if (jRadioButtonMenuItemDataBits6.isSelected()) { serialConnection.setDataBits(6);}
        if (jRadioButtonMenuItemDataBits7.isSelected()) { serialConnection.setDataBits(7);}
        if (jRadioButtonMenuItemDataBits8.isSelected()) { serialConnection.setDataBits(8);}
        if (jRadioButtonMenuItemParityNone.isSelected()) { serialConnection.setParity("none");}
        if (jRadioButtonMenuItemParityEven.isSelected()) { serialConnection.setParity("even");}
        if (jRadioButtonMenuItemParityOdd.isSelected()) { serialConnection.setParity("odd");}                  
    }
     
    @Action
    public void displayCharts() {
         chartManager.updateVisibility(jDesktopPaneAccelerometer,"ACDXN",jCheckBoxACDXN.isSelected());
         chartManager.updateVisibility(jDesktopPaneAccelerometer,"ACDX1",jCheckBoxACDX1.isSelected());
         chartManager.updateVisibility(jDesktopPaneAccelerometer,"ACDX2",jCheckBoxACDX2.isSelected());
         chartManager.updateVisibility(jDesktopPaneAccelerometer,"ACDYN",jCheckBoxACDYN.isSelected());
         chartManager.updateVisibility(jDesktopPaneAccelerometer,"ACDY1",jCheckBoxACDY1.isSelected());
         chartManager.updateVisibility(jDesktopPaneAccelerometer,"ACDY2",jCheckBoxACDY2.isSelected());
         chartManager.updateVisibility(jDesktopPaneAccelerometer,"ACDZN",jCheckBoxACDZN.isSelected());
         chartManager.updateVisibility(jDesktopPaneAccelerometer,"ACDZ1",jCheckBoxACDZ1.isSelected());
         chartManager.updateVisibility(jDesktopPaneAccelerometer,"ACDZ2",jCheckBoxACDZ2.isSelected());  
         chartManager.updateVisibility(jDesktopPaneAccelerometer,"ACL",(jCheckBoxACLXN.isSelected() || 
                                      jCheckBoxACLX1.isSelected() ||
                                      jCheckBoxACLX2.isSelected() ||
                                      jCheckBoxACLYN.isSelected() ||
                                      jCheckBoxACLY1.isSelected() ||
                                      jCheckBoxACLY2.isSelected() ||
                                      jCheckBoxACLZN.isSelected() ||
                                      jCheckBoxACLZ1.isSelected() ||
                                      jCheckBoxLZ2.isSelected()));                                                                     
                                        
         chartManager.updateVisibility(jDesktopPaneAngles,"ANDX",true);
         chartManager.updateVisibility(jDesktopPaneAngles,"ANDY",true);
         chartManager.updateVisibility(jDesktopPaneAngles,"ANDZ",true);
         chartManager.updateVisibility(jDesktopPaneAngles,"ANL",true);
         chartManager.updateVisibility(jDesktopPaneAngles,"ANC",true);
         
         
         //chartManager.updateAxis("LX", 2);
    }

    @Action
    public void displayChartsWithoutFilters() {
        jCheckBoxACDXN.setSelected(true);
        jCheckBoxACDX1.setSelected(false);
        jCheckBoxACDX2.setSelected(false);
        jCheckBoxACDYN.setSelected(true);
        jCheckBoxACDY1.setSelected(false);
        jCheckBoxACDY2.setSelected(false);
        jCheckBoxACDZN.setSelected(true);
        jCheckBoxACDZ1.setSelected(false);
        jCheckBoxACDZ2.setSelected(false);
        jCheckBoxACLXN.setSelected(true);
        jCheckBoxACLX1.setSelected(false);
        jCheckBoxACLX2.setSelected(false);
        jCheckBoxACLYN.setSelected(true);
        jCheckBoxACLY1.setSelected(false);
        jCheckBoxACLY2.setSelected(false);
        jCheckBoxACLZN.setSelected(true);
        jCheckBoxACLZ1.setSelected(false);
        jCheckBoxLZ2.setSelected(false);
        displayCharts();  
    }

    @Action
    public void displayAllDialCharts() {
        jCheckBoxACDXN.setSelected(true);
        jCheckBoxACDX1.setSelected(true);
        jCheckBoxACDX2.setSelected(true);
        jCheckBoxACDYN.setSelected(true);
        jCheckBoxACDY1.setSelected(true);
        jCheckBoxACDY2.setSelected(true);
        jCheckBoxACDZN.setSelected(true);
        jCheckBoxACDZ1.setSelected(true);
        jCheckBoxACDZ2.setSelected(true);
        jCheckBoxACLXN.setSelected(false);
        jCheckBoxACLX1.setSelected(false);
        jCheckBoxACLX2.setSelected(false);
        jCheckBoxACLYN.setSelected(false);
        jCheckBoxACLY1.setSelected(false);
        jCheckBoxACLY2.setSelected(false);
        jCheckBoxACLZN.setSelected(false);
        jCheckBoxACLZ1.setSelected(false);
        jCheckBoxLZ2.setSelected(false);
        displayCharts();  
    }

    @Action
    public void displayNoCharts() {
        jCheckBoxACDXN.setSelected(false);
        jCheckBoxACDX1.setSelected(false);
        jCheckBoxACDX2.setSelected(false);
        jCheckBoxACDYN.setSelected(false);
        jCheckBoxACDY1.setSelected(false);
        jCheckBoxACDY2.setSelected(false);
        jCheckBoxACDZN.setSelected(false);
        jCheckBoxACDZ1.setSelected(false);
        jCheckBoxACDZ2.setSelected(false);
        jCheckBoxACLXN.setSelected(false);
        jCheckBoxACLX1.setSelected(false);
        jCheckBoxACLX2.setSelected(false);
        jCheckBoxACLYN.setSelected(false);
        jCheckBoxACLY1.setSelected(false);
        jCheckBoxACLY2.setSelected(false);
        jCheckBoxACLZN.setSelected(false);
        jCheckBoxACLZ1.setSelected(false);
        jCheckBoxLZ2.setSelected(false);
        chartManager.resetPositions();
        displayCharts();  
    }
    
    @Action
    public void start() {       
        dataManager.startAcceleration();
        serialConnection.openPort();
        jButtonStart.setEnabled(false);
        jButtonStop.setEnabled(true);
    }

    @Action
    public void stop() {
        dataManager.stopAcceleration();
        serialConnection.closePort();
        jButtonStop.setEnabled(false);
        jButtonStart.setEnabled(true);
    }

    @Action
    public void reset() {
        dataManager.resetAcceleration();
        chartManager.resetValues();
    }

    @Action
    public void exportValues() {
        dataManager.save(CubeApp.getApplication().getMainFrame());
    }

    @Action
    public void importValues() {
        dataManager.load(CubeApp.getApplication().getMainFrame());
    }    


    @Action
    public void cubeDemoStart() {
        ((CubeChart) chartManager.getHashtableOfCharts().get("CC")).startAnimation();
    }

    @Action
    public void cubeDemoStop() {
        ((CubeChart) chartManager.getHashtableOfCharts().get("CC")).stopAnimation();
    }




    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroupBaudrate;
    private javax.swing.ButtonGroup buttonGroupDataBits;
    private javax.swing.ButtonGroup buttonGroupParity;
    private javax.swing.ButtonGroup buttonGroupPort;
    private javax.swing.ButtonGroup buttonGroupStopBits;
    private javax.swing.JButton jButtonAllDialCharts;
    private javax.swing.JButton jButtonChartsWithoutFilters;
    private javax.swing.JButton jButtonClear;
    private javax.swing.JButton jButtonExport;
    private javax.swing.JButton jButtonImport;
    private javax.swing.JButton jButtonLed;
    private javax.swing.JButton jButtonOptionsAccelerometerCalibrate;
    private javax.swing.JButton jButtonOptionsGyroscopeCalibrate;
    private javax.swing.JButton jButtonReset;
    private javax.swing.JButton jButtonSend;
    private javax.swing.JButton jButtonStart;
    private javax.swing.JButton jButtonStop;
    private javax.swing.JCheckBox jCheckBoxACDX1;
    private javax.swing.JCheckBox jCheckBoxACDX2;
    private javax.swing.JCheckBox jCheckBoxACDXN;
    private javax.swing.JCheckBox jCheckBoxACDY1;
    private javax.swing.JCheckBox jCheckBoxACDY2;
    private javax.swing.JCheckBox jCheckBoxACDYN;
    private javax.swing.JCheckBox jCheckBoxACDZ1;
    private javax.swing.JCheckBox jCheckBoxACDZ2;
    private javax.swing.JCheckBox jCheckBoxACDZN;
    private javax.swing.JCheckBox jCheckBoxACLX1;
    private javax.swing.JCheckBox jCheckBoxACLX2;
    private javax.swing.JCheckBox jCheckBoxACLXN;
    private javax.swing.JCheckBox jCheckBoxACLY1;
    private javax.swing.JCheckBox jCheckBoxACLY2;
    private javax.swing.JCheckBox jCheckBoxACLYN;
    private javax.swing.JCheckBox jCheckBoxACLZ1;
    private javax.swing.JCheckBox jCheckBoxACLZN;
    private javax.swing.JCheckBox jCheckBoxLZ2;
    private javax.swing.JComboBox jComboBoxAccelerometerMeasurementRange;
    private javax.swing.JComboBox jComboBoxAccelerometerVdd;
    private javax.swing.JComboBox jComboBoxCubeType;
    private javax.swing.JComboBox jComboBoxFilterFrequency;
    private javax.swing.JComboBox jComboBoxFilterType;
    private javax.swing.JDesktopPane jDesktopPaneAccelerometer;
    private javax.swing.JDesktopPane jDesktopPaneAngles;
    private javax.swing.JLabel jLabelCharts;
    private javax.swing.JLabel jLabelCharts1;
    private javax.swing.JLabel jLabelCube1;
    private javax.swing.JLabel jLabelFilter;
    private javax.swing.JLabel jLabelFilterFrequency;
    private javax.swing.JLabel jLabelFilterType;
    private javax.swing.JLabel jLabelFilters;
    private javax.swing.JLabel jLabelFilters1;
    private javax.swing.JLabel jLabelOptionsAccelerometer;
    private javax.swing.JLabel jLabelOptionsAccelerometerMeasurementRange;
    private javax.swing.JLabel jLabelOptionsAccelerometerVdd;
    private javax.swing.JLabel jLabelOptionsBothsMotors;
    private javax.swing.JLabel jLabelOptionsGyroscope;
    private javax.swing.JLabel jLabelOptionsLeftMotor;
    private javax.swing.JLabel jLabelOptionsMotorTest;
    private javax.swing.JLabel jLabelOptionsRightMotor;
    private javax.swing.JLabel jLabelXAxis;
    private javax.swing.JLabel jLabelXAxis1;
    private javax.swing.JLabel jLabelYAxis;
    private javax.swing.JLabel jLabelYAxis1;
    private javax.swing.JLabel jLabelZAxis;
    private javax.swing.JLabel jLabelZAxis1;
    private javax.swing.JMenu jMenuBaudrate;
    private javax.swing.JMenu jMenuDataBits;
    private javax.swing.JMenu jMenuParity;
    private javax.swing.JMenu jMenuPort;
    private javax.swing.JMenu jMenuStopBits;
    private javax.swing.JPanel jPanelAccelerationOptions;
    private javax.swing.JPanel jPanelAccelerometer;
    private javax.swing.JPanel jPanelAngles;
    private javax.swing.JPanel jPanelAnglesOptions;
    private javax.swing.JPanel jPanelControls;
    private javax.swing.JPanel jPanelDebug;
    private javax.swing.JPanel jPanelGyroscope;
    private javax.swing.JPanel jPanelOptionMotorTest;
    private javax.swing.JPanel jPanelOptions;
    private javax.swing.JPanel jPanelOptionsAccelerometer;
    private javax.swing.JPanel jPanelOptionsGyroscope;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemBaudrate115200;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemBaudrate1200;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemBaudrate19200;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemBaudrate38400;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemBaudrate4800;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemBaudrate57600;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemBaudrate9600;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemDataBits5;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemDataBits6;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemDataBits7;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemDataBits8;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemParityEven;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemParityNone;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemParityOdd;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemPortCom1;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemPortCom2;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemPortCom3;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemStopBits1;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemStopBits15;
    private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItemStopBits2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPaneDebug;
    private javax.swing.JSlider jSliderOptionsAccelerometerX;
    private javax.swing.JSlider jSliderOptionsAccelerometerY;
    private javax.swing.JSlider jSliderOptionsAccelerometerZ;
    private javax.swing.JSlider jSliderOptionsBothsMotors;
    private javax.swing.JSlider jSliderOptionsLeftMotor;
    private javax.swing.JSlider jSliderOptionsRightMotor;
    private javax.swing.JTabbedPane jTabbedPane;
    private javax.swing.JTable jTableOptionsAccelerometer;
    private javax.swing.JTextArea jTextAreaDebug;
    private javax.swing.JTextField jTextFieldDebug;
    private javax.swing.JToggleButton jToggleButtonOptionsStartMotor;
    private javax.swing.JToggleButton jToggleButtonUpdate;
    private javax.swing.JPanel mainPanel;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JMenu optionsMenu;
    // End of variables declaration//GEN-END:variables

}
